package com.sh.data.engine.repository.dao.normalization.modeldesign.cdm.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.sh.data.engine.repository.dao.base.EngineBaseModel;
import lombok.*;

@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
@TableName("tb_cdm_tbl_relation")
public class TblRelationEntity extends EngineBaseModel<TblRelationEntity> {

    /**
     * 项目id
     */
    private Long projectId;

    // 0-1对1 1-1对多 2-多对一
    private Integer type;

    /**
     * 主表id
     */
    private Long mainTableId;

    /**
     * 主表字段
     */
    private String mainTableField;

    /**
     * 外键关联表id
     */
    private Long foreignTableId;

    /**
     * 关联表字段
     */
    private String foreignTableField;

    private String uuid;
}
